package com.inspiration.entity;

import java.util.HashMap;
import java.util.Map;

/**
 * 简单包装返回值
 * @Author Vincent.jiao
 * @Date 2023/10/27 10:39
 */
public class R {
    public static Map<String, Object> ok(String key, Object val) {
        Map<String, Object> map = new HashMap<>();
        map.put(key, val);
        map.put("code", 200);

        return map;
    }

    public static Map<String, Object> fail(String key, Object val) {
        Map<String, Object> map = new HashMap<>();
        map.put(key, val);
        map.put("code", 200);

        return map;
    }
}
